﻿using System;
using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace StatsData.Data.Migrations
{
    public partial class modify_table_t_otd : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.RenameColumn(
                name: "TOTAL_PLAN_LINE_QTY",
                table: "T_OTD",
                newName: "YES_OTD_QTY");

            migrationBuilder.RenameColumn(
                name: "ODT_QTY",
                table: "T_OTD",
                newName: "TOTAL_OTD_QTY");

            migrationBuilder.AddColumn<DateTime>(
                name: "FIRST_ESTIMATE_SHIPMENT_SCHEDULE_TIME",
                table: "T_OTD",
                type: "TIMESTAMP(7)",
                nullable: false,
                defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));

            migrationBuilder.AddColumn<decimal>(
                name: "NO_OTD_QTY",
                table: "T_OTD",
                type: "NUMBER(18,6)",
                precision: 18,
                scale: 6,
                nullable: false,
                defaultValue: 0m);
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropColumn(
                name: "FIRST_ESTIMATE_SHIPMENT_SCHEDULE_TIME",
                table: "T_OTD");

            migrationBuilder.DropColumn(
                name: "NO_OTD_QTY",
                table: "T_OTD");

            migrationBuilder.RenameColumn(
                name: "YES_OTD_QTY",
                table: "T_OTD",
                newName: "TOTAL_PLAN_LINE_QTY");

            migrationBuilder.RenameColumn(
                name: "TOTAL_OTD_QTY",
                table: "T_OTD",
                newName: "ODT_QTY");
        }
    }
}
